﻿#ifndef PDFIMAGEPROVIDER_H
#define PDFIMAGEPROVIDER_H

#include <QQuickImageProvider>

class PdfImageProvider : public QQuickImageProvider
{
    Q_OBJECT
public:
    explicit PdfImageProvider(QObject *parent = nullptr);

    QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize) override;

    void updateImage(QImage& img);

    void clipImage(double x, double y, int len);

signals:
    void imageChanged(const QString& imageTag);

private:
    QImage image;

};

#endif // PDFIMAGEPROVIDER_H
